/**
 * “前台管理”相关接口
 */
import request from '@/utils/request'

export default {
  /** applyReturn.vue -- 开始 **/
  /** 退货申请处理接口 **/
  applyReturnEdit(params){
    let data = {
      id: params.id,
      processInformation: params.processInformation,
      orderId: params.orderId,
      orderStatus: params.orderStatus
    }
    return request({
      url: 'shopOrderReturn/editOrder',
      method: 'post',
      data
    });
  },

  /** applyReturn.vue -- 结束 **/
  /** returnProcessing.vue --开始**/
  /** 退货成功接口 **/
  returnProcessingNext(params){
    let data = {
      id: params.id,
      orderStatus: params.orderStatus
    }
    return request({
      url: 'shopOrderInfo/data/updateById',
      method: 'post',
      data
    });
  },
  returnProcessingSuccOrFail(params) {
    let data = {
      id: params.id,
      orderStatus: params.orderStatus
    }
    return request({
      url: 'shopOrderInfo/returnProcessing',
      method: 'post',
      data
    });
  },
  /** returnProcessing.vue --结束**/

  /** 公共接口功能--开始 **/
  initOrderList(params) {
    const data = {
      orderStatusList: params.orderStatusList,
      orderSn: params.orderSn,
      phone: params.phone,
      applayReturnTime: params.createDate
    };
    return request({
      url: 'shopOrderInfo/infoOfReturnByPage?page='+params.currentPage+'&size='+params.pagesize,
      method: 'post',
      data
    })
  },
  /** 公共接口功能--开始 **/
}
